package com.itheima.listener;

import jdk.nashorn.internal.ir.ReturnNode;
import org.springframework.context.ApplicationContext;

import javax.servlet.ServletContext;

/**
 * @author wuli
 * @create 2021-11-17 22:20
 */
public class WebApplicationContextUtils {

    public static ApplicationContext getWebApplicationContext(ServletContext servletContext) {
        ApplicationContext context = (ApplicationContext) servletContext.getAttribute("context");
        return context;
    }
}
